<template>
  <div class="bg-my-color">
    <div style="display: flex;justify-content: center;align-items: center;">
      <!-- vue-ueditor-wrap v-model="content" editor-id="editor" :config="editorConfig"
        :editorDependencies="['ueditor.config.js', 'ueditor.all.js']" /> -->
    </div>
  </div>

</template>

<script>
// import VueUeditorWrap from 'vue-ueditor-wrap'
export default {
  components: {
    // VueUeditorWrap
  },
  name: "Index",
  data() {
    return {
      // 版本号
      version: "3.8.8",
      content: '<p>Hello</p>',
      editorConfig: {
        // 后端服务地址，后端处理参考
        // https://open-doc.modstart.com/ueditor-plus/backend.html
        //  serverUrl: '/api/path/to/server',
        serverUrl: 'http://192.168.2.169:3300/ueditor/upload',
        // serverUrl: 'https://qywx.precare.cn/prod-api/business/jkkepu/commonFileUpload',
        UEDITOR_HOME_URL: '/static/UEditorPlus/',
        UEDITOR_CORS_URL: '/static/UEditorPlus/',
        enableAutoSave: true, // 关闭自动保存
        initialFrameHeight: 600, // 编辑器高度
        initialFrameWidth: 1200, // 设置宽度
        // 允许上传的文件类型
        allowFileTypes: ['image', 'media', 'file'],
        // 图片上传配置
        imageActionName: 'uploadimage', // 执行上传图片的action名称
        imageFieldName: 'file', // 提交的图片表单名称
        imageMaxSize: 10485760, // 上传大小限制，单位B
        imageUrlPrefix: '', // 确保这是图片访问的正确前缀
        imageAllowFiles: ['.png', '.jpg', '.jpeg', '.gif', '.bmp'], // 上传图片格式显示
        toolbars: [
          [
            'source', '|', 'undo', 'redo', '|',
            'bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'superscript', 'subscript', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc', '|',
            'rowspacingtop', 'rowspacingbottom', 'lineheight', '|',
            'customstyle', 'paragraph', 'fontfamily', 'fontsize', '|',
            'directionalityltr', 'directionalityrtl', 'indent', '|',
            'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', '|', 'touppercase', 'tolowercase', '|',
            'link', 'unlink', 'anchor', '|', 'imagenone', 'imageleft', 'imageright', 'imagecenter', '|',
            'simpleupload',  'emotion', 'scrawl', 'insertvideo', 'music', 'attachment', 'map', 'insertframe', 'insertcode', 'webapp', 'pagebreak', 'template', 'background', '|',
            'horizontal', 'date', 'time', 'spechars', 'snapscreen', 'wordimage', '|',
            'inserttable', 'deletetable', 'insertparagraphbeforetable', 'insertrow', 'deleterow', 'insertcol', 'deletecol', 'mergecells', 'mergeright', 'mergedown', 'splittocells', 'splittorows', 'splittocols', 'charts', '|',
            'print', 'preview', 'searchreplace', 'drafts', 'help'
          ]
        ]
      }
    };
  },
  mounted() {
    // 初始化登录组件
    // console.log(`${process.env.VUE_APP_BASE_API}business/jkkepu/commonFileUpload`);
    // console.log(process.env.VUE_APP_APPID, 'VUE_APP_APPID');
    // console.log(process.env.VUE_APP_BACKURL, 'BACKURL');
  },
  methods: {
    goTarget(href) {
      window.open(href, "_blank");
    }
  }
};
</script>

<style scoped lang="scss">
.home {
  blockquote {
    padding: 10px 20px;
    margin: 0 0 20px;
    font-size: 17.5px;
    border-left: 5px solid #eee;
  }

  hr {
    margin-top: 20px;
    margin-bottom: 20px;
    border: 0;
    border-top: 1px solid #eee;
  }

  .col-item {
    margin-bottom: 20px;
  }

  ul {
    padding: 0;
    margin: 0;
  }

  font-family: "open sans",
  "Helvetica Neue",
  Helvetica,
  Arial,
  sans-serif;
  font-size: 13px;
  color: #676a6c;
  overflow-x: hidden;

  ul {
    list-style-type: none;
  }

  h4 {
    margin-top: 0px;
  }

  h2 {
    margin-top: 10px;
    font-size: 26px;
    font-weight: 100;
  }

  p {
    margin-top: 10px;

    b {
      font-weight: 700;
    }
  }

  .update-log {
    ol {
      display: block;
      list-style-type: decimal;
      margin-block-start: 1em;
      margin-block-end: 1em;
      margin-inline-start: 0;
      margin-inline-end: 0;
      padding-inline-start: 40px;
    }
  }
}
</style>
